//
//  DBManage.h
//  MooreDoll
//
//  Created by 郭景豪 on 2015/1/2.
//  Copyright (c) 2015年 Tank. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DBManageController.h"
@interface DBManage : NSObject


//=================DB 使用方法=============
//取得朋友名單
+(NSArray *)getRoster;

//取得篩選 排序 名單
+(NSArray *)coreDataSearchWithEntityName:(NSString *)entityName Predicate:(NSString *)predicateString sortDescriptor:(NSString *)sortString ascending:(BOOL)ascending;

//設定朋友
+(void)setFriend:(NSArray *)friends;

//取得Vcard 更新Vcard
+(void)getVcardResult:(NSDictionary *)vcardInfo;

//儲存
+ (void)saveContext;

//改變Roster 狀態 
+(void)changePresenceOnAndOffWithPresence:(BOOL)presence whoseJid:(NSString *)Jid;


+(void)whoseRoom:(NSString *)jid completionBlock:(void(^)(Room *room))completion failureBlock:(void(^)(BOOL noRoom))failureBlock;

@end
